package com.csea.app.model.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "修改用户基本信息请求对象")
public class UserBaseInfoUpdateReqVO {
    @Size(max = 20, message = "姓名长度不能超过20个字符")
    @Schema(description = "姓名")
    private String name;

    @Range(min = 0, max = 2, message = "性别参数不合法")
    @Schema(description = "性别 0-未知 1-男 2-女")
    private Integer gender;

    @Min(value = 1, message = "年龄不能小于1岁")
    @Max(value = 150, message = "年龄不能超过150岁")
    @Schema(description = "年龄")
    private Integer age;

    @Email(message = "邮箱格式不正确")
    @Schema(description = "邮箱")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    @Schema(description = "手机号")
    private String phone;

    @Size(max = 50, message = "微信账号长度不能超过50个字符")
    @Schema(description = "微信")
    private String wechat;

    @Size(max = 15, message = "QQ号码长度不能超过15个字符")
    @Schema(description = "QQ")
    private String qq;
}